home *** CD-ROM | disk | FTP | other *** search
- Path: news.IT.net!news
- From: gema001@pn.itnet.it (Antonio Romeo)
- Newsgroups: comp.lang.c++
- Subject: Re: need help with functions
- Date: 27 Feb 1996 16:27:02 GMT
- Organization: CyberPress
- Message-ID: <4gvbcm$4p2@alpha.it.net>
- References: <4grqta$mcb@ixnews3.ix.netcom.com>
- NNTP-Posting-Host: gema001.pn.itnet.it
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In article <4grqta$mcb@ixnews3.ix.netcom.com>, wells2@ix.netcom.com says...
- >
- >
- >
- > I am learning c++, I wrote this program and I have a problem with it
- >that i cant figure out. I am doin this for my class in college. I am
-
- >says something like.... "Get_payment is not suffieciently different
-
- unction Prototype
- >
- >void Get_Payment(float,float,int,float); // Function prototype
- >
- >
- >void Get_Payment(float &loan_amount,float &interest_rate,int
- > &number_of_payments, float &payment)
- >
- > {
- > ...
- > return;
- > }
-
-
- I think the problem is in the difference between the prototipe
- and the implementation of the function:
- float and float &
- just aren't the same type. If you want to pass the variable reference
- in function (and not jst its value) you must use a prototype as:
-
- void Get_Payment(float &, float &, int &, float &);
-
- Antonio Romeo - Rome - Italy
- gema001@pn.itnet.it
-
-
-
-